using System;
using System.Data.Entity.ModelConfiguration;
using System.Data.Common;
using System.Data.Entity;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using DomainLayer.Data.Entities;

namespace Infrastructure.Data.Mapping
{
	public class WaybillTransferMap : EntityTypeConfiguration<WaybillTransfer>
	{
		public WaybillTransferMap()
		{
			// Primary Key
			this.HasKey(t => t.ID);

			// Properties
			this.Property(t => t.TruckNo)
				.HasMaxLength(20);
				
			// Table & Column Mappings
			this.ToTable("WaybillTransfer");
			this.Property(t => t.ID).HasColumnName("ID");
			this.Property(t => t.WaybillNo).HasColumnName("WaybillNo");
			this.Property(t => t.DriverId).HasColumnName("DriverId");
			this.Property(t => t.TruckNo).HasColumnName("TruckNo");
			this.Property(t => t.IsPrint).HasColumnName("IsPrint");
			this.Property(t => t.CreateTime).HasColumnName("CreateTime");
			this.Property(t => t.CreateBy).HasColumnName("CreateBy");
			this.Property(t => t.UpdateTime).HasColumnName("UpdateTime");
			this.Property(t => t.UpdateBy).HasColumnName("UpdateBy");
		}
	}
}

